﻿using System;
using System.Collections.Generic;
using Autodesk.Revit.Attributes;
using Autodesk.Revit.DB;
using Autodesk.Revit.UI;
using YArchitech.Revit;

namespace HYFloorPipeModule
{
	[Transaction(TransactionMode.Manual)]
	[Regeneration(RegenerationOption.Manual)]
	public class TestDrawLine : HYNoTranExternalCommand
	{
		public override Result HYExecute()
		{
			Transaction transaction = new Transaction(base.Doc, "绘制盘管线段");
			Reference reference = base.Sel.PickObject((Autodesk.Revit.UI.Selection.ObjectType)1, new HYModelLineGroupFilter(), "选择模型线组");
			base.Doc.GetElement(reference);
			new List<ModelLine>();
			reference = base.Sel.PickObject((Autodesk.Revit.UI.Selection.ObjectType)1, "选路由起点线段");
			base.Doc.GetElement(reference);
			base.Doc.GetElement(base.Sel.PickObject((Autodesk.Revit.UI.Selection.ObjectType)1, "选择第一个喷头"));
			base.Doc.GetElement(base.Sel.PickObject((Autodesk.Revit.UI.Selection.ObjectType)1, "选择第二个喷头"));
			transaction.Start();
			transaction.Commit();
			return Autodesk.Revit.UI.Result.Succeeded;
		}
	}
}
